
<!DOCTYPE html>
<html>

	<head>
	<title>CAIJL's Blog</title>
	<meta charset="utf-8"/>
	<link rel="stylesheet" href="/font-awesome-4.7.0/css/font-awesome.min.css">

	<link rel="stylesheet" href="/bootstrap-3.3.7/css/bootstrap.min.css">
	<script src="/jquery-2.1.1/jquery.min.js"></script>
	<script src="/bootstrap-3.3.7/js/bootstrap.min.js"></script>

	<link rel="stylesheet" href="/css/bootstrap-slider.min.css">
	<script src="/js/bootstrap-slider.min.js"></script>
	
	<link rel="stylesheet" href="/css/main.css">
	<script src="/js/main.js"></script>
	
	<link rel="stylesheet" href="/css/cursor.css">
	<script src="/js/cursor.js"></script>
	
	
	<link rel="stylesheet" href="/css/code.css">
	<!--link rel="stylesheet" href="/css/markdown.css"-->
	
	<link rel="stylesheet" href="/css/head.css">

	<script src="/js/window.js"></script>
	<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
	</head>
<body>

	<link rel="stylesheet" href="/katex/katex.min.css" crossorigin="anonymous">
	<script src="/katex/katex.min.js" crossorigin="anonymous"></script>
	<script src="/katex/contrib/mathtex-script-type.min.js" defer></script>
	<script defer src="/katex/contrib/auto-render.min.js"crossorigin="anonymous"
	    onload="renderMathInElement(document.body);"></script>
	<script>document.addEventListener("DOMContentLoaded", function() {renderMathInElement(document.body,{"delimiters":[{left: "$", right: "$", display: false}]});});</script>
	<nav class="navbar navbar-default header card" role="navigation" style="width: 100%;">
	<div class="container-fluid"> 
	<div class="navbar-header">
		<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target="#example-navbar-collapse">
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
		</button>
		<a class="navbar-brand" href="/"><span><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold">C</mi><mi mathvariant="bold">A</mi><mi mathvariant="bold">I</mi><mi mathvariant="bold">J</mi><msup><mi mathvariant="bold">L</mi><mo mathvariant="bold" lspace="0em" rspace="0em">′</mo></msup><mi mathvariant="bold">s</mi><mi mathvariant="bold">B</mi><mi mathvariant="bold">L</mi><mi mathvariant="bold">O</mi><mi mathvariant="bold">G</mi></mrow><annotation encoding="application/x-tex">\mathbf{CAIJL'sBLOG}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.751892em; vertical-align: 0em;"></span><span class="mord"><span class="mord mathbf">C</span><span class="mord mathbf">A</span><span class="mord mathbf">I</span><span class="mord mathbf">J</span><span class="mord"><span class="mord mathbf">L</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.751892em;"><span class="" style="top: -3.063em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathbf mtight">′</span></span></span></span></span></span></span></span></span><span class="mord mathbf">s</span><span class="mord mathbf">B</span><span class="mord mathbf">L</span><span class="mord mathbf">O</span><span class="mord mathbf">G</span></span></span></span></span></span></a>
	</div>
	<div class="collapse navbar-collapse" id="example-navbar-collapse">
		<ul class="nav navbar-nav" style="background-color:#fcfcfc">
			<li><a href="/"><i class="menu-item-icon fa fa-fw fa-home"></i>首页</a></li>
			<li><a href="/archives/"><i class="menu-item-icon fa fa-fw fa-archive"></i>文章</a></li>
			<li><a href="/tags/"><i class="menu-item-icon fa fa-fw fa-tags"></i>标签</a></li>
			<li><a href="/settings/"><i class="menu-item-icon fa fa-fw fa-cogs"></i>设置</a></li>
			<!--li><a href="/about/"><i class="menu-item-icon fa fa-fw fa-user"></i>关于</a></li-->
			<li><a href="/games/"><i class="menu-item-icon fa fa-fw fa-gamepad"></i>其它</a></li>
			

		</ul>
	</div>
	</div>
	</nav>
<div class="container">
	<div style="height: 60px;"></div>
	<div class="row" >
		<div class="col-md-8">
			<div class="panel panel-default card" style="padding: 10px;position: relative;">
                <img src='/img/bg/24.png' style="width:100%"/>
				<span style="position: absolute;left:15px;bottom:15px;width:90%;"><font class="view-text" style="color:#fcfcfc;font-size:25px">图论计数小计</font><br><a href="/tags/2021/" class="tag"><span  style="background-color: rgb(52, 152, 219);">2021</span></a>&nbsp;<a href="/tags/生成函数/" class="tag"><span  style="background-color: rgb(231, 76, 60);">生成函数</span></a>&nbsp;<a href="/tags/拉格朗日反演/" class="tag"><span  style="background-color: rgb(231, 76, 60);">拉格朗日反演</span></a>&nbsp;<a href="/tags/笔记/" class="tag"><span  style="background-color: rgb(82, 196, 26);">笔记</span></a></span>
			</div>
			<div class="panel panel-default card" style="padding: 10px;" id="main">
                <p>
<script type="math/tex">\rm W\color{red}YH\_AK</script> 教我边双与点双！！</p>
<h2 id="_1">基础概念</h2>
<p>点双：删去任意一个点仍然是连通图。</p>
<p>边双：删去任意一条边后仍然是连通图。</p>
<p>知道了基础概念就可以做了。</p>
<h2 id="_2">无向联通图计数</h2>
<p>
<script type="math/tex">F(x)</script> 为任意有标号无向图的 <script type="math/tex">\bf EGF</script>，<script type="math/tex">G(x)</script> 为无向连通图的 <script type="math/tex">\bf EGF</script>，那么显然有 <script type="math/tex">F(x)=\exp G(x)</script>,<script type="math/tex">G(x)=\ln F(x)</script>.</p>
<p>
<script type="math/tex">F(x)</script> 非常显然就是 <script type="math/tex">\sum 2^{\binom i2}x^i/i!</script>
</p>
<h2 id="_3">点双联通图计数</h2>
<p>首先给一个连通图钦定上一个根，得到<strong>有根</strong>无向连通图的 <script type="math/tex">\bf EGF</script>
<script type="math/tex">D(x)</script>，发现 <script type="math/tex">[x^n]D(x)=n[x^n]G(x)</script>
</p>
<p>设<strong>无根</strong>有标号点双的方案为 <script type="math/tex">b_i</script>， <script type="math/tex">\bf EGF</script> 为 <script type="math/tex">B(x)</script>。</p>
<p>一个连通图把钦定的根删掉，若原先根在几个点双联通分量里，那么现在就会出现几个联通块。</p>
<p>考虑每一个联通块，加上钦定的根，都可以理解为一个点双，每一个除了根的点上又可以有一棵有根联通图。故一个联通块的生成函数就是：
<script type="math/tex; mode=display">\sum_{i=1}b_{i+1}\frac{D^i(x)}{i!}=B^\prime(D(x))</script>
于是乎就列出一个方程：
<script type="math/tex; mode=display">D(x)=x\exp B^\prime(D(x))</script>
我们的目标是要求 <script type="math/tex">B^\prime(x)</script>，记为 <script type="math/tex">H(x)</script>。先化一波：
<script type="math/tex; mode=display">H(D(x))=\ln \frac{D(x)}x</script>
好了记 <script type="math/tex">W(x)=\ln\frac{D(x)}x</script>：
<script type="math/tex; mode=display">H(D(x))=W(x)\Longrightarrow H(x)=W(D^{-1}(x))=W\circ D^{-1}</script>
看到 <script type="math/tex">W\circ D^{-1}</script> 就可以拉反了：
<script type="math/tex; mode=display">[x^n](W\circ D^{-1})=\frac1n[x^{n-1}]W^\prime(x)(\frac{D(x)}x)^{-n}</script>
就是说：
<script type="math/tex; mode=display">[x^n]H(x)=\frac1n[x^{n-1}]W^\prime(x)(\frac x{D(x)})^n</script>
<script type="math/tex; mode=display">(n+1)[x^{n+1}]B(x)=\frac1n[x^{n-1}]W^\prime(x)(\frac x{D(x)})^n</script>
<script type="math/tex; mode=display">[x^n]B(x)=\frac1{n(n-1)}[x^{n-2}]W^\prime(x)(\frac x{D(x)})^{n-1}</script>
<script type="math/tex; mode=display">n![x^n]B(x)=(n-2)![x^{n-2}]W^\prime(x)(\frac x{D(x)})^{n-1}</script>
看上去常数大的像一坨*</p>
<h2 id="_4">边双联通图计数</h2>
<p>记<strong>有根</strong>无向连通图的 <script type="math/tex">\bf EGF</script> 为 <script type="math/tex">D(x)</script>，<strong>有根</strong>边双连通图数 <script type="math/tex">\bf EGF</script> 是 <script type="math/tex">B(x)</script>。</p>
<p>仍然有：<script type="math/tex">[x^n]D(x)=n[x^n]G(x)</script>。</p>
<p>于是乎：
<script type="math/tex; mode=display">D(x)=\sum_{i=1}\frac{b_ix^i}{i!}\times\exp (D(x))^i=B(x\exp D(x))</script>
理解：枚举根所在的边双的大小 <script type="math/tex">i</script>。把这个边双删掉得到若干有根无向连通图。每一个边双上的点连出去的是 <script type="math/tex">\exp D(x)</script>，一共是 <script type="math/tex">(\exp D(x))^i</script>。还要除以 <script type="math/tex">i!</script> 因为是 <script type="math/tex">\bf EGF</script>。</p>
<p>和点双就一样了。</p>
<p>设 <script type="math/tex">H(x)=x\exp D(x)</script>，直接扩展拉反：
<script type="math/tex; mode=display">B\circ H=D\Longrightarrow B=D\circ H^{-1}</script>
<script type="math/tex; mode=display">[x^n]D\circ H^{-1}(x)=\frac1n[x^{n-1}]D^\prime(x)\left(\frac x{H(x)}\right)^n</script>
</p>
			</div>
			<div class="panel panel-default card" style="padding: 10px;height: 50px;font-size: 20px;">
				<a style="float: left;" href="\article\P7364.html"><i class="fa fa-angle-double-left"></i></a><a style="float: right;" href="\article\P2767.html"><i class="fa fa-angle-double-right"></i></a>
			</div>
			<div class="panel panel-default card" style="padding: 10px;font-size: 20px;" id="vcomments">
				
			</div>
			<script>
				new Valine({
					el: '#vcomments',
					appId: 'PAlFUPg0pQVTFTEo8gCB4BCf-gzGzoHsz',
					appKey: 'U38ejnLUiizJ6vLyp6ql4hRq',
					path: window.location.pathname
				})
			</script>
		</div>
		<div class="col-md-3">
				<div class="panel panel-default card">
				<div class="panel-heading">
					<h3 class="panel-title">
						<i class="fa fa-info"></i>&emsp;
						<strong>文章信息</strong>
					</h3>
				</div>
                <div style="margin: 10px;">
                    <div style="margin-top: 8px;display: flex;"> 
    <span style="flex: 1 0 auto;margin-right: 6px;">标题</span>
    <span><font style="font-weight: bold">图论计数小计</font></span>
	</div><div style="margin-top: 8px;display: flex;"> 
    <span style="flex: 1 0 auto;margin-right: 6px;">日期</span>
    <span>2021-04-27 21:04:33</span>
	</div>
                </div>
				</div>
				<div class="panel panel-default card">
				<div class="panel-heading">
					<h3 class="panel-title">
						<i class="fa fa-tag"></i>&emsp;
						<strong>标签</strong>
					</h3>
				</div>
				<div style="margin: 10px;">
					<a href="/tags/2021/" class="tag"><span  style="background-color: rgb(52, 152, 219);">2021</span></a>&nbsp;<a href="/tags/生成函数/" class="tag"><span  style="background-color: rgb(231, 76, 60);">生成函数</span></a>&nbsp;<a href="/tags/拉格朗日反演/" class="tag"><span  style="background-color: rgb(231, 76, 60);">拉格朗日反演</span></a>&nbsp;<a href="/tags/笔记/" class="tag"><span  style="background-color: rgb(82, 196, 26);">笔记</span></a>
				</div>
				</div>
				
			<div class="panel panel-default card">
					<div class="panel-heading">
						<h3 class="panel-title">
							<i class="fa fa-user-circle-o"></i>&emsp;
							<strong>caijicjl</strong>
						</h3>
					</div>
					<div style="width: 60%;display: inline-block;padding-top: 10px;">
						<ul class="propertyLinks" style="list-style-type: none;">
							<li>
								<img style="vertical-align:middle;position:relative;top:-2px" src="/img/rating-16x16.png">
								Rating:&nbsp;
								<span style="font-weight:bold;color: gray ">312</span>
							</li>
							<li>
								<img style="vertical-align:middle;position:relative;top:-2px" src="/img/star_blue_16.png">
								Contribution:&nbsp;
								<span style="color:gray;font-weight:bold;">0</span>
							</li>
						</ul>
						<ul class="nav-links">
							<li><a href="/settings/">Settings</a></li>
							<li><a href="/archives/">Blog</a></li>
							<li><a href="/teams">Teams</a></li>
							<li><a href="/submissions/dingdingsb">Submissions</a></li>
							<li><a href="/usertalk">Talks</a></li>
							<li><a href="/contests/with/dingdingsb">Contests</a></li>
						</ul>
					</div>
					<div style="display:inline-block;vertical-align: top;margin: 10px;text-align: center;">
						<div style="height:50px;width:50px"><img src="/img/avatar.png"/></div>
						<div><a href="https://www.luogu.com.cn/user/174304" style="font-weight:bold;color:gray">caijicjl</a></div>
					</div>
				</div>
		<div class="panel panel-default card">
				<div class="panel-heading">
					<h3 class="panel-title">
						<i class="fa fa-external-link"></i>&emsp;
						<strong>画中画</strong>
					</h3>
				</div>
				<div style="width:100%;margin:10px">
				<input type="text" id="url"/>
				<input value="创建" type="button" onclick="creat('kk')" /> 
				</div>
		</div>
		<script src="/js/hitokoto.js"></script>
							

				
				<span id="kk"></span>
				<div  id="myScrollspy" class="card" style="width: 100%;"  data-spy="affix">
					<script src="/js/make_toc.js"></script>
				</div>
		</div>
	</div>
 </div>
</body>
</html>
